//1.引入Vue
import Vue from "vue"
//2.引入VueRouter
import VueRouter from "vue-router"

//引入组件
import Loagin from '../pages/Login'
import Home from '../pages/Home'
//3.使用路由器 (本质是插件)
Vue.use(VueRouter)

//4.创建并暴露Router实例
export default new VueRouter({
  //在实例化路由器对象的配置中,书写路由表配置
  routes: [{ path: '/login', component: Loagin }, { path: '/home', component: Home }]
})